package Service;

import Model.ArrangeInfo;
import org.apache.ibatis.annotations.Param;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface ArrangeInfoService {
    List<ArrangeInfo> getAllArrangeInfoList();
    /**
     * 派工日程安排页面：一个老人被服务时间显示（表格）
     * @param ArrangeID
     * @return
     */
    List<ArrangeInfo> getDateArrangeInfo(@Param(value="ArrangeID")String ArrangeID);
    /**
     * 派工日程安排页面：根据ID查看是否已选择工作日
     * @param ArrangeID
     * @return
     */
    String findChosenDaybyID(@Param(value="ArrangeID")String ArrangeID);
    /**
     * 派工信息页面：搜索
     * @param servOrg
     * @param settleCode
     * @param servStatus
     * @param elderName
     * @param elderYbid
     * @param elderId
     * @param nursingName
     * @param nursingYbid
     * @param nursingId
     * @param startDate
     * @param dueDate
     * @param startTime
     * @return
     */
    List<ArrangeInfo> findArrangeInfo(@Param(value = "servOrg") String servOrg , @Param(value="settleCode")String settleCode,
                                      @Param(value="servStatus")String servStatus, @Param(value = "elderName") String elderName ,
                                      @Param(value="elderYbid")String elderYbid, @Param(value="elderId")String elderId,
                                      @Param(value = "nursingName") String nursingName , @Param(value="nursingYbid")String nursingYbid,
                                      @Param(value="nursingId")String nursingId, @Param(value = "startDate") String startDate ,
                                      @Param(value="dueDate")String dueDate, @Param(value="startTime")String startTime);

    /**
     * 派工单信息页面：权限：搜索当前机构下的派工信息
     * @param thisSettleCode
     * @param servOrg
     * @param servStatus
     * @param elderName
     * @param elderYbid
     * @param elderId
     * @param nursingName
     * @param nursingYbid
     * @param nursingId
     * @param startDate
     * @param dueDate
     * @param startTime
     * @return
     */
    List<ArrangeInfo> findArrangeInfobySettleCode(@Param(value="thisSettleCode")String thisSettleCode,@Param(value = "servOrg") String servOrg ,
                                                @Param(value="servStatus")String servStatus, @Param(value = "elderName") String elderName ,
                                                @Param(value="elderYbid")String elderYbid, @Param(value="elderId")String elderId,
                                                @Param(value = "nursingName") String nursingName , @Param(value="nursingYbid")String nursingYbid,
                                                @Param(value="nursingId")String nursingId, @Param(value = "startDate") String startDate ,
                                                @Param(value="dueDate")String dueDate, @Param(value="startTime")String startTime);
    /**
     * 派工信息页面：插入信息
     * @param elderYbid
     * @param OrgSettleCode
     * @param servContent
     * @param servID
     * @return
     * */
    String insertArrangeInfo(@Param(value = "elderYbid") String elderYbid,
                             @Param(value = "OrgSettleCode") String OrgSettleCode,
                             @Param(value = "servContent") List<String> servContent,
                             @Param(value="servID")List<String>servID);

    /**
     * 派工信息页面：删除派工订单
     * @param id
     * @return
     */
    String deleteArrangeOrder(int id);

    /**
     * 新增派工单页面：增加服务项内容
     * @param servContent
     * */
    String insertArrangeContents(@Param(value="servContent") List<String> servContent);

    /**
     * 派工日程安排页面：确定服务时间
     * @param StartDate
     * @param DueDate
     * @param StartTime
     * @param ServWorkLength
     * @param StaffYbid
     * @param ChosenWeekday
     * @param ArrangeID
     * @param serv_status
     * @return
     */
     String choseServTime(@Param(value="StartDate")String StartDate,@Param(value="DueDate")String DueDate,
                      @Param(value="StartTime")String StartTime,@Param(value="ServWorkLength")String ServWorkLength,
                      @Param(value="StaffYbid")String StaffYbid,@Param(value="ChosenWeekday")List<String> ChosenWeekday,
                      @Param(value="ArrangeID")String ArrangeID,@Param(value="serv_status")String serv_status);


     /**
             * 派工日程安排页面：确定服务时间
     * @param StartDate
     * @param DueDate
     * @param StartTime
     * @param ServWorkLength
     * @param StaffYbid
     * @param ChosenWeekday
     * @param ArrangeID
      * @param serv_status
     * @return
             */
    int choseServShortTime(@Param(value="StartDate")String StartDate,@Param(value="DueDate")String DueDate,
                         @Param(value="StartTime")String StartTime,@Param(value="ServWorkLength")String ServWorkLength,
                         @Param(value="StaffYbid")String StaffYbid,@Param(value="ChosenWeekday")List<String> ChosenWeekday,
                         @Param(value="ArrangeID")String ArrangeID,@Param(value="serv_status")String serv_status);

    /**
     * 派工日程安排页面：搜索护工的派工日程
     * @param NursingYbid
     * @param whichWeek
     * @return
     */
    List<Map<String,Object>> findNurseArrangement(@Param(value="NursingYbid")String NursingYbid,
                                                  @Param(value="whichWeek")String whichWeek);

    /**
     * 派工信息页面：更新订单状态
     * @return
     */
    String judgeStatus();
    /**
     * 派工信息页面：权限：查看派工单
     * @param settleCode
     * @return
     */
    List<ArrangeInfo> getAllArrangeInfobySettleCode(@Param(value="settleCode")String settleCode);
    /**
     * 微信小程序：登录页面-搜索护工信息
     * @param StaffYbid
     * @param password
     * @return
     */
    String wechatLoginStaff(@Param(value="StaffYbid")String StaffYbid,@Param(value="password")String password);

    /**
     * 微信小程序：老人页面：查询到护工的服务老人
     * @param StaffYbid
     * @return
     */
    List<Map<String,Object>> wechatElderBySatff(@Param(value="StaffYbid")String StaffYbid);

    /**
     * 微信小程序：老人页面：根据护工id查找到服务的老人

     * @return
     */
    List<Map<String,Object>> getMyelder(ArrangeInfo arrangeInfo);

    /**
     * 微信小程序：健康信息页面：查询到老人的服务内容
     * @param ArrangeID
     * @return
     */
    List<String> wechatServIDByID(@Param(value="ArrangeID") String ArrangeID);

    /**
     * 微信小程序：健康信息页面：根据订单id找到老人YBID
     * @param ArrangeID
     * @return
     */
    String findElderYbidbyID(@Param(value="ArrangeID") String ArrangeID);


    /**
     * 根据HgId获取派工单
     * @param arrangeInfo
     * @return
     */
    List<ArrangeInfo> getArrangeByHgId(ArrangeInfo arrangeInfo);

    String InputExcel(InputStream is, String originalFilename, String settleCode);

//    int CompleteInputExcel();


//    int NewOrderEveryDayTime();
;
}
